/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.account.manage;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.Solon;
import org.noear.solon.annotation.Import;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * <b>(AccountManageApplication)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/4/13
 */
@Slf4j
@Import(scanPackages = {"info.peigen.hotpot", "vip.xiaonuo", "com.gitee.peigenlpy.actable"})
public class AccountManageApplication {
    public static void main(String[] args) throws UnknownHostException {
        Solon.start(AccountManageApplication.class, args, app -> Solon.cfg());
        String ip      = InetAddress.getLocalHost().getHostAddress();
        String port    = Solon.cfg().getProperty("server.port");
        String path    = Solon.cfg().getProperty("server.contextPath");
        String appName = Solon.cfg().appName();
        log.info("\n----------------------------------------------------------\n\t" +
                appName + " Application is running! Access Urls:\n\t" +
                "Local: \t\thttp://localhost:" + port + "/" + path + "/\n\t" +
                "External: \thttp://" + ip + ":" + port + "/" + path + "/\n\t" +
                "Swagger文档: http://" + ip + ":" + port + "/" + path + "/doc.html\n" +
                "----------------------------------------------------------");
    }
}
